<div id="admin_users">
  <p>
    <a href="<%= new_admin_user_path %>" class="btn btn-success btn-sm">
      <su-icon icon="plus" color="#fff" fix-width></su-icon>
      新增
    </a>
  </p>
  <%= grid(@users, show_filters: :when_filtered) do |g|
    #g.action_column param_name: :select_ids, object_property: :id
    #g.column name: "<i class='fa fa-asterisk fa-fw'></i>", attribute: 'id', filter: false, ordering: true
    g.column name: "#{t 'activerecord.attributes.user.name'}", attribute: 'name' do |c|
      link_to c.name, admin_user_path(c.id)
    end
    g.column name: "#{t 'activerecord.attributes.user.phone'}", attribute: 'phone'
    g.column name: "#{t 'activerecord.attributes.user.email'}", attribute: 'email'
    g.column name: "#{t 'activerecord.attributes.user.remark'}", attribute: 'remark'
    g.column do |c|
      grid_operator(:admin_user_path, c.id)
    end
  end %>
</div>
<script type="text/javascript" data-turbolinks-eval="true">
  new Vue({
    el: "#admin_users"
  })
</script>